export const getters = {
  /*test*/
  afterTest: (state)=>{
    return state.test*2;
  },
  todosTotals:(state)=>{
    return state.todos.length;
  },
  completedTotals:(state)=>{
    return state.todos.reduce((pre,next)=>{return pre+(next.completed?1:0)},0);
  },
  clearShow:(state,getters)=>{
    return getters.todosTotals > 0 && getters.completedTotals > 0;
  },
  todosShow:(state,getters)=>{
    return getters.todosTotals > 0;
  }
}
